<template>
  <div class="tips-container">
    <el-dialog
      v-model="tipsShow"
      :close-on-click-modal="false"
      :before-close="close"
      title="提示信息"
      width="25%"
      style="height: 400px"
    >
      <div class="tips">
        <div style="text-indent: 2rem; margin-bottom: 10px">
          因移动作战系统在使用中，经常出现人员账号和实际情况不一致的情况，请各队站通信人员按照本单位实际编制填写人员信息，以便我们较对数据库人员数据
        </div>
        <div>
          <i></i>
          填写说明：请先选择机构的类别，分成国家队、政府专职队和混编三种。
        </div>
      </div>
      <template #footer>
        <div align="center">
          <el-button type="primary" class="confirm" @click="save">确认</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { useLoginInfoStore } from '@/store'

const loginStore = useLoginInfoStore()

const tipsShow = ref(false)

onMounted(() => {
  if (loginStore.loginInfo.loginType === 1) {
    tipsShow.value = true
  }
})

/** 关闭弹窗 */
const close = () => {
  tipsShow.value = false
}

/** 保存机构人员信息 */
const save = () => {
  tipsShow.value = false
}
</script>

<style lang="scss" scoped>
.tips-container {
  .confirm {
    width: 90px;
    border-color: #209dbe;
    background-color: #209dbe;
  }

  .el-dialog__footer {
    text-align: center !important;
  }
}
.tips {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  i {
    display: inline-block;
    width: 26px;
    height: 26px;
    background-image: url('@/assets/image/tips-icon.png');
    background-size: 100% 100%;
    vertical-align: bottom;
  }
}

::v-deep .el-dialog {
  height: 300px !important;
  .el-dialog__footer {
    padding-top: 0;
  }
}
</style>
